Depth First Search

نویسندگان

  • Toshiaki Nishihara
  • Yasuhiko Minamide
چکیده

Depth-first search of a graph is formalized with function. It is shown that it visits all of the reachable nodes from a given list of nodes. Executable ML code of depth-first search is obtained with code generation feature of Isabelle/HOL. The formalization contains two implementations of depth-first search: one by stack and one by nested recursion. They are shown to be equivalent. The termination condition of the version with nested-recursion is shown by the method of inductive invariants.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Path-based depth-first search for strong and biconnected components

Depth-first search, as developed by Tarjan and coauthors, is a fundamental technique of efficient algorithm design for graphs [23]. This note presents depth-first search algorithms for two basic problems, strong and biconnected components. Previous algorithms either compute auxiliary quantities based on the depth-first search tree (e.g., LOWPOINT values) or require two passes. We present one-pa...

متن کامل

An Analysis of Consecutively Bounded Depth-First Search with Applications in Automated Deduction

Consecutively bounded depth-first search involves repeatedly performing exhaustive depth-first search with increasing depth bounds of 1, 2, 3, and so on. The effect is similar to that of breadth-first search, but, instead of retaining the results at level n 1 for use in computing level n, earlier results are recomputed. Consecutively bounded depth-first search is useful whenever a complete sear...

متن کامل

Pruning uplieate Nodes in th-First

Best-first search algorithms require exponential memory, while depth-first algorithms require only linear memory. On graphs with cycles, however, depth-first searches do not detect duplicate nodes, and hence may generate asymptotically more nodes than best-first searches. We present a technique for reducing the asymptotic complexity of depth-first search by eliminating the generation of duplica...

متن کامل

Incomplete Depth-first Search Techniques: a Short Survey

Constraint Satisfaction Problem (CSP) is a discrete combinatorial problem and hence search algorithms belong to the main constraint satisfaction techniques. There exist local search techniques exploring complete but inconsistent assignments and depth-first search techniques extending partial consistent assignments towards complete assignments. For most problems it is impossible to explore compl...

متن کامل

Depth-First vs. Best-First Search: New Results

Best-first search (BFS) expands the fewest nodes among all admissible algorithms using the same cost function, but typically requires exponential space. Depth-first search needs space only linear in the maximumsearch depth, but expands more nodes than BFS. Using a random tree, we analytically show that the expected number of nodes expanded by depth-first branch-and-bound (DFBnB) is no more than...

متن کامل

Weighted anytime search: new schemes for optimization over graphical models

Weighted search (best-first or depth-first) refers to search with a heuristic function multiplied by a constant w [Pohl (1970)]. The paper shows for the first time that for graphical models optimization queries weighted best-first and weighted depth-first Branch and Bound search schemes are competitive energy-minimization anytime optimization algorithms. Weighted best-first schemes were investi...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Archive of Formal Proofs

دوره 2004  شماره 

صفحات  -

تاریخ انتشار 2004